//
//  UIAlertController+ZZCExtension.m
//  ZZC-Finance
//
//  Created by mac on 2017/5/25.
//  Copyright © 2017年 mac. All rights reserved.
//
#define ZZCAlertTitle @"提示"
#define ZZCAlertMsgOk @"确认"
#define ZZCAlertMsgCancel @"取消"
#import "UIAlertController+ZZCExtension.h"

@implementation UIAlertController (ZZCExtension)


+ (void)showInfoAlertVCInVC:(UIViewController *)rootVC
                    message:(NSString *)message
                         ok:(void (^ __nullable)())okHandler {
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:ZZCAlertTitle message:message preferredStyle:UIAlertControllerStyleAlert];
    alertController.view.tintColor = [UIColor colorWithHex:0xEB6927];
    UIAlertAction *action = [UIAlertAction actionWithTitle:ZZCAlertMsgOk style:UIAlertActionStyleDefault handler:okHandler];
    [alertController addAction:action];
    [rootVC presentViewController:alertController animated:YES completion:nil];
}
+ (void)showInfoAlertLoginVC:(UIViewController *)rootVC
                       title:(NSString *)title
                     message:(NSString *)message
                          ok:(void (^ __nullable)())okHandler {
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
    alertController.view.tintColor = [UIColor colorWithHex:0xEB6927];
    UIAlertAction *action = [UIAlertAction actionWithTitle:ZZCAlertMsgOk style:UIAlertActionStyleDefault handler:okHandler];
    [alertController addAction:action];
    [rootVC presentViewController:alertController animated:YES completion:nil];
}


@end
